<template>
	<view style="width: 100vw;height: 100%;">
		<view style="display: flex;align-items: center;justify-content: center;flex-direction: column;margin-top: 20px;">
			<image @click="konwcode" :src='qr' style="background:#fff;width:300px;height:300px" />
			<view>{{tx}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				qr:'https://www.a-shen.net/images/mxdz/gzh.jpg',
				tx:'保存二维码图片后扫码关注公众号'
			}
		},
	
		onLoad:function(optons){
			let  i18n = uni.getStorageSync('i18n')
			if(i18n === 'en'){
				uni.setNavigationBarTitle({'title':'Follow official account'})
				this.tx = 'Save the QR code image and scan the code to follow the official account'
			}
		},
	
		methods: {
			konwcode(index){
				console.log(index)
				var url = [this.qr]
				uni.previewImage({
					urls:url,
					current:index
				})
			}
		}
		
	}
</script>

<style>
</style>
